<div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="panel-body" style="padding: 15px 0;">
                <ul class="nav nav-tabs">
                    <li class="active"><a href="/node/list">节点列表</a></li>
                    <li><a href="/node/add">添加节点</a></li>
                </ul>
            </div>
            <div class="panel-body">
                <div class="row">
                    <form>
                        <div class="col-md-3 col-lg-offset-9">
                            <div class="input-group">
                                <input class="form-control" type="text" value="" placeholder="ip/node_id" name="keyword">
                                  <span class="input-group-btn">
                                    <button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-search"></i></button>
                                  </span>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            <div class="panel panel-default">
                <div class="table-responsive">
                    <table class="table table-bordered">
                        <thead>
                        <tr>
                            <th class="w8p">id</th>
                            <th class="w18p">ip</th>
                            <th class="w18p">管理端口</th>
                            <th class="w18p">消息端口</th>
                            <th class="w13p">token</th>
                            <th class="w13p">备注</th>
                            <th class="w15p">创建时间</th>
                            <th class="w15p">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        {{range $node := .nodes}}
                        <tr>
                            <td class="center">{{$node.Id}}</td>
                            <td>{{$node.Ip}}</td>
                            <td>{{$node.ManagerPort}}</td>
                            <td>{{$node.MessagePort}}</td>
                            <td class="center">{{$node.Token}}</td>
                            <td class="center">{{$node.Comment}}</td>
                            <td class="center">{{dateFormat $node.CreateTime "Y-m-d H:i:s" }}</td>
                            <td class="center">
                                <a name="edit" data-link="/node/edit?node_id={{$node.Id}}"><i class="glyphicon glyphicon-pencil"> </i>修改</a>
                                <a name="delete" onclick='Common.confirm("确认要删除吗?", "/node/delete?node_id={{$node.Id}}")'><i class="glyphicon glyphicon-remove"></i>删除</a>
                            </td>
                        </tr>
                        {{end}}
                        </tbody>
                    </table>
                </div>
                <div class="panel-footer"></div>
            </div>
        </div>
    </div>
</div>
<script src="/static/js/modules/node.js"></script>
<script type="text/javascript">
    Node.bindFancyBox();
</script>